<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActionController::Routing::Optimisation::Optimiser</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActionController::Routing::Optimisation::Optimiser</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/rails/actionpack/lib/action_controller/routing/optimisations_rb.html">
                vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000978">applicable?</a>&nbsp;&nbsp;
      <a href="#M000976">generation_code</a>&nbsp;&nbsp;
      <a href="#M000975">guard_conditions</a>&nbsp;&nbsp;
      <a href="#M000974">new</a>&nbsp;&nbsp;
      <a href="#M000977">source_code</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">GLOBAL_GUARD_CONDITIONS</td>
          <td>=</td>
          <td class="context-item-value">[           &quot;(!defined?(default_url_options) || default_url_options.blank?)&quot;,           &quot;(!defined?(controller.default_url_options) || controller.default_url_options.blank?)&quot;,           &quot;defined?(request)&quot;,           &quot;request&quot;</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">kind</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">route</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000974" class="method-detail">
        <a name="M000974"></a>

        <div class="method-heading">
          <a href="#M000974" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(route, kind)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000974-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000974-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb, line 30</span>
30:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">route</span>, <span class="ruby-identifier">kind</span>)
31:           <span class="ruby-ivar">@route</span> = <span class="ruby-identifier">route</span>
32:           <span class="ruby-ivar">@kind</span>  = <span class="ruby-identifier">kind</span>
33:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000978" class="method-detail">
        <a name="M000978"></a>

        <div class="method-heading">
          <a href="#M000978" class="method-signature">
          <span class="method-name">applicable?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Temporarily disabled <tt>:url</tt> optimisation pending proper solution to
Issues around request.host etc.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000978-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000978-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb, line 54</span>
54:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">applicable?</span>
55:           <span class="ruby-keyword kw">true</span>
56:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000976" class="method-detail">
        <a name="M000976"></a>

        <div class="method-heading">
          <a href="#M000976" class="method-signature">
          <span class="method-name">generation_code</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000976-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000976-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb, line 39</span>
39:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generation_code</span>
40:           <span class="ruby-value str">'nil'</span>
41:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000975" class="method-detail">
        <a name="M000975"></a>

        <div class="method-heading">
          <a href="#M000975" class="method-signature">
          <span class="method-name">guard_conditions</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000975-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000975-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb, line 35</span>
35:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guard_conditions</span>
36:           [<span class="ruby-value str">&quot;false&quot;</span>]
37:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000977" class="method-detail">
        <a name="M000977"></a>

        <div class="method-heading">
          <a href="#M000977" class="method-signature">
          <span class="method-name">source_code</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000977-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000977-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb, line 43</span>
43:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">source_code</span>
44:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">applicable?</span>
45:             <span class="ruby-identifier">guard_condition</span> = (<span class="ruby-constant">GLOBAL_GUARD_CONDITIONS</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">guard_conditions</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &amp;&amp; &quot;</span>)
46:             <span class="ruby-node">&quot;return #{generation_code} if #{guard_condition}\n&quot;</span>
47:           <span class="ruby-keyword kw">else</span>
48:             <span class="ruby-value str">&quot;\n&quot;</span>
49:           <span class="ruby-keyword kw">end</span>
50:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>